<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>home</title>
</head>
<body>
<%--<jsp:include page="/html/common/top.jsp"></jsp:include>--%>
<%@include file="/html/common/top.jsp" %>
<%@include file="/html/common/menu.jsp" %>
<div id="right">

    <form action="/user/update" method="post">

        ID： <input name="id" type="text" value="${user.id}"><br>

        姓名：<input name="username" type="text" value="${user.username}"></br>

        部门：<select id="dept" name="deptId">
            <c:forEach items="${list}" var="dept">
                <%--选中（selected）--%>
                <option value="${dept.id}" <c:if test="${dept.id==user.deptId}">selected</c:if> >${dept.name}</option>
            </c:forEach>
        </select>

        <input type="submit" value="保存">
    </form>
</div>

</body>
</html>
